package com.home.service;

import java.util.List;

import com.home.dao.LightDao;
import com.home.po.Light;

public class LightService {

	LightDao dao = new LightDao();
	
	public void addLight(Light light) {
		dao.insert(light);
	}
	
	public List<Light> query(Light light, int start, int pageSize) {
		List<Light> lights = dao.select(light, start, pageSize);
		return lights;
	}
	
	public void remove(int id) {
		dao.delete(id);
	}
	
	public void update(Light light) {
		dao.update(light);
	}
	
}
